home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / itrns211.zip / SRC / IFM.H < prev    next >
C/C++ Source or Header  |  1991-10-07  |  3KB  |  95 lines

  1. #ifndef IFM_H
  2. #define IFM_H
  3.  
  4. /*
  5.  *========================================================================== 
  6.  * Copyright 1991 Avinash Chopde, All Rights Reserved.
  7.  *
  8.  * Permission to use, copy, modify and distribute this software and its
  9.  * documentation for any purpose is hereby granted without fee, provided that
  10.  * the above copyright notice appear in all copies and that both that
  11.  * copyright notice and this permission notice appear in supporting
  12.  * documentation, and that the name of Avinash Chopde not be used in
  13.  * advertising or publicity pertaining to distribution of the software
  14.  * without specific, written prior permission.
  15.  * Avinash Chopde makes no representations about the suitability of this
  16.  * software for any purpose.
  17.  * It is provided "as is" without express or implied warranty.
  18.  *
  19.  * AVINASH CHOPDE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  20.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  21.  * IN NO EVENT SHALL AVINASH CHOPDE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  23.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  24.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  25.  * OF THIS SOFTWARE.
  26.  *
  27.  * Author:  Avinash Chopde, 1991
  28.  *        C2 Colonial Drive #4, Andover, MA 01810, USA.
  29.  *
  30.  */
  31.  
  32. /* static char S_RCSID[] = "$Header: e:/itrans/src/rcs/ifm.h 1.3 91/10/07 23:27:45 avinash Exp $"; */
  33.  
  34. #include <stdio.h>
  35.  
  36. #if defined(__STDC__) || (PROTO_C)
  37. #   define P(s)    s
  38. #else
  39. #   define P(s) ()
  40. #endif
  41.  
  42. /* Lines from the IFM file may contain these tokens: CC, CCS, CCADD,
  43.  * word, number, etc
  44.  * Examples:
  45. (start of indian script composite char metrics:)
  46. Comment -I- StartINDIAN
  47. (indian script font name and number (number is from y.tab.h - yacc generated:)
  48. Comment -I- FONT 224 devnac.afm marathi
  49. (indian script composite char metrics:)
  50. Comment -I- CC a 2 ; PCC 97 0 0 ; PCC 129 -70 0 ;
  51. (special composite char metrics added:)
  52. Comment -I- CCADD normA ;
  53. (define equivalence bewteen khadi's:)
  54. Comment -I- CCS normAkp normA ;
  55. (end of indian script composite char metrics:)
  56. Comment -I- EndINDIAN
  57.  *
  58.  */
  59.  
  60. /* tokens returned by yylex(), values must be > 0 and distinct */
  61. #define COMMENT_IFMTAG        1
  62. #define IFM_IFMTAG        2
  63. #define ENDIFM_IFMTAG        3
  64. #define CC_IFMTAG        4
  65. #define CCS_IFMTAG        5
  66. #define CCADD_IFMTAG        6
  67. #define PCC_IFMTAG        7
  68. #define DNAME_IFMTAG        8
  69. #define NUMBER_IFMTAG        9
  70. #define IMPLICIT_IFMTAG        10
  71. #define NONE_IFMTAG        11
  72. #define DELTAS_IFMTAG        12
  73. #define FONT_IFMTAG        13
  74. #define PROP_IFMTAG        14
  75.  
  76. /* the lexer is switched between many states depending on which
  77.  * file it is reading, these macros are used to guide the lexer
  78.  * to the correct patterns.
  79.  * (see set_lex_input_fp().)
  80.  */
  81. #define BEGIN_IFM        1
  82. #define BEGIN_INPUT        2
  83.  
  84. extern set_lex_input_fp    P((FILE* fp, int begin));
  85.  
  86. extern int G_ifm_lineno; /* current line number, IFM file */
  87.  
  88. /** extern functions */
  89. extern int get_ifm_token    P((FILE* fp, char* word));
  90. extern void reset_pifm        P(());
  91.  
  92. /* ===========================^ ifm.h ^============================== */
  93. #undef P
  94. #endif /* IFM_H */
  95.